package vn.bang.xiangqi.server.business;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;

import vn.bang.utility.DatabaseResource;
import vn.bang.utility.EntityManagerFactoryUtil;
import vn.bang.utility.JpaUtil;

public class AbstractBaseBusiness {
	
	static protected EntityManager createEntityManager() {
		final EntityManagerFactory EMF = EntityManagerFactoryUtil.getEntityManagerFactory(DatabaseResource.SERVER_PERSISTENCE_UNIT);
		return JpaUtil.createEntityManager(EMF);
	}
	
}
